
\subsubsection{Mathematical model}
Objective:
\begin{equation}
\max{\min_{i \in I}\{u_i\}}
\end{equation}

Constraints:
\begin{align}
&0\le P_g \le 1 \\
&\forall_{i \in I}{x_i\ge 0} \\
&\forall_{i \in I}{c_i\ge 0} \\
&\forall_{i \in I}{y_i = x_i + c_i} \\
&\sum_{i \in I}{x_i} = P_g \cdot G \\
&\forall_{i \in I}{u_i = c_i + \alpha_i \cdot P_g \cdot G}
\end{align}

\subsubsection{AMPL model}

\begin{lstlisting}[language=c,style=outcode,caption=rawls.model.ampl]
################# PARAMETERS
param N;                     # number of the agents
param G;                     # cost of the good
param alpha{1..10} >=0, <=1; # MRS
param y{1..10} >=0;          # endowment
################# VARIABLES
var x{1..N} >=0;             # contribution/tax
var u{1..N};                 # utility
var c{1..N} >=0;             # private constumption
var Pg >= 0, <=1;            # scale of good provision
################# CONSTRAINTS
subject to util {i in 1..N}:
	u[i] = c[i] + alpha[i] * Pg * G;
subject to provide_good:
	sum{i in 1..N} x[i] = Pg * G;
subject to budgets {i in 1..N}:
	y[i] = x[i] + c[i];
################# OBJECTIVE
maximize rawls:
	min{i in 1..N} u[i];
\end{lstlisting}

\subsubsection{Results}
\begin{lstlisting}[language=c,style=outcode,caption=Egalitarian results for scenario A]
DONLP2: Success! KKT conditions satisfied
F = 116.9068101
9 iters; 14 function, 5 gradient evals
957 component constraint, 21 grad evals
final objective scaling = 100.05
norm(grad(f)) = 1, Lagrangian violation = 9.28647e-15
feas. violation = 7.81597e-14, dual feas. violation = 0
###### RAWLS ##### Pg = 1.00 ###
\end{lstlisting}


\begin{table}[H]
\caption{Egalitarian results for scenario A}
\begin{center}
\begin{tabular}{|r||r|r|r|r|r|}
\hline
$i$ & $\alpha_i$ & $y_i$ & $x_i$ & $c_i$ & $u_i$ \\
\hline 
 1 &0.55 &91.15 &10.72 &80.43 &135.13   \\
 2 &0.75 &121.29& 17.55&103.74& 178.93  \\
 3 &0.54 &100.49& 10.51& 89.99& 144.05  \\
 4 &0.23 &93.48 &0.00  &93.48 &116.91   \\
 5 &0.43 &107.64& 6.78 &100.86& 143.74  \\
 6 &0.56 &127.22& 11.11&116.11& 171.98 \\
 7 &0.72 &98.34 &16.50 &81.84 &153.87   \\
 8 &0.67 &74.08 &8.29  &65.79 &133.05   \\
 9 &0.47 &85.57 &8.08  &77.49 &124.28   \\
10 &0.54 &100.62& 10.47& 90.15& 144.09  \\
\hline
\end{tabular}
\end{center}
\label{tab:rawls_res_A}
\end{table}
